/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */

import java.util.Random;

/**
 * <p>Project: jse2204 - RandDemo
 * <p>Powered by webrx On 2022-08-31 16:48:17
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class RandDemo {
    public static void main(String[] args) {
        Random rand = new Random();
        System.out.println(rand.nextInt(6)); //0-5

        //jdk1.8 没有rand.nextInt(int a,int b)方法
        //System.out.println(rand.nextInt(6,18));


        //jdk1.8没有 String没有repeat方法  java11 有String.repeat(6);
        //System.out.println("*".repeat(rand.nextInt(50)));

    }
}
